package cn.sciento.boot.tenant.aspect.aop;

import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;
import cn.sciento.boot.tenant.aspect.TenantInitAspect;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**

 */
@Component
public class TenantUpdateAdvice implements MethodInterceptor {
  private static final Logger LOGGER = LoggerFactory.getLogger(TenantInitAspect.class);
  
  @Autowired
  private TenantInitAspect tenantInitAspect;
  
  @Override
  public Object invoke(MethodInvocation invocation) throws Throwable {
    return this.tenantInitAspect.updateTenantInit(invocation);
  }
}
